home *** CD-ROM | disk | FTP | other *** search
-
- Listing 3
- **************
-
- struct s_compare find_min_max(one, two, three);
- int one, two, three; /* Input values to compare */
- {
- struct s_compare compare;
- {
- if (one > two)
- {
- if (one > three)
- compare.maximum = one;
- else
- compare.maximum = three;
- if (two > three)
- compare.minimum = three;
- else
- compare.minimum = two;
- else
- {
- if (two > three)
- compare.maximum = two;
- else
- compare.maximum = three;
- if (one > three)
- compare.minimum = three;
- else
- compare.minimum = one;
- }
- return compare;
- }
- **********
-
-